import torch
import torchvision
import torchaudio

# 测试 torch
print("Testing torch...")
x = torch.rand(5, 3)
print(x)

# 测试 torchvision
print("Testing torchvision...")
from torchvision import datasets, transforms
transform = transforms.Compose([transforms.ToTensor()])
dataset = datasets.MNIST(root='./data', train=True, download=True, transform=transform)
print(dataset[0])

# 测试 torchaudio
print("Testing torchaudio...")
waveform, sample_rate = torchaudio.load('徐良 小凌-坏女孩.mp3')
print(waveform)
print(sample_rate)



